package com.dxq.oa.service.impl;

import com.dxq.oa.dao.RoleDao;
import com.dxq.oa.entity.Role;
import com.dxq.oa.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;
    @Override
    public List<Role> findRole(Integer s, Integer r) {
        int start1 = (s -1 )*r;
        return this.roleDao.selRole(start1,r);
    }

    @Override
    public long totol() {
        return this.roleDao.findTotal();
    }
}
